大家好我是容易放棄的前工程師,我想寫自己的APP很久了但每次環境設定就讓我止步,經過了一年的怠惰放棄最終進行了往前一步的嘗試,感謝ChatGPT還有Gemini的協助讓我終於完成安裝的第一步驟:No issues found!
以下是我遇到的三個問題:
- [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
因為我不會用cmd的關係讓我只能嘗試利用介面
- Open Android Studio
- Tools > SDK Manager
- SDK Tools > Android SDK Command-line Tools (latest) > Apply
如果還沒下載 Android SDK Command-line Tools (latest) 左邊會有一個下載的icon記得先按下載
- [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
X Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
因為我不會用cmd的關係,後來才發現非常的直覺,完整輸入即可。
- [!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.5.4)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
MSVC v142
- VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest C++ CMake tools for Windows
Windows 10 SDK
- 打開 Visual Studio Installer
- 按下 修改 Modify
- 選擇 "Desktop development with C++"
- 選擇 安裝 Install
全部完成之後再重跑一次 flutter doctor 就可以見到 No issues found!